### Function Description

Update credentials.

### Request Parameters

#### Interface parameters

| Fields                | Type   | Required | Description                                                                                                 |
|-----------------------|--------|----------|-------------------------------------------------------------------------------------------------------------|
| bk_scope_type         | string | yes      | Resource scope type. Optional values: biz - Business，biz_set - Business Set                                 |
| bk_scope_id           | string | yes      | Resource scope ID. Corresponds to bk_scope_type, which means business ID or business set ID                 |
| bk_biz_id             | long   | yes      | Deprecated. Business ID. This field has been deprecated and replaced by the field bk_scope_type+bk_scope_id |
| id                    | string | yes      | Credential ID                                                                                               |
| name                  | string | no       | Credential name                                                                                             |
| type                  | string | no       | Credential type, which can be ACCESS_KEY_SECRET_KEY,PASSWORD,USERNAME_PASSWORD,SECRET_KEY                   |
| description           | string | no       | Credential description                                                                                      |
| credential_access_key | string | no       | Required when the credential type is ACCESS_KEY_SECRET_KEY                                                  |
| credential_secret_key | string | no       | Required when the credential type is ACCESS_KEY_SECRET_KEY/SECRET_KEY                                       |
| credential_username   | string | no       | Required when the credential type is USERNAME_PASSWORD                                                      |
| credential_password   | string | no       | Required when the credential type is USERNAME_PASSWORD/PASSWORD                                             |

### Example of request

```json
{
    "bk_scope_type": "biz",
    "bk_scope_id": "1",
    "id": "06644309e10e4068b3c7b32799668210",
    "name": "testCredential",
    "type": "USERNAME_PASSWORD",
    "description": "This is a new credential",
    "credential_username": "admin",
    "credential_password": "newPassword"
}
```

### Example of responses

```json
{
    "result": true,
    "code": 0,
    "data": {
        "id": "06644309e10e4068b3c7b32799668210"
    },
    "job_request_id": "xxx"
}
```

### Response Description

{% include '_generic_response.md.j2' %}

#### data

| Fields | Type   | Never null | Description   |
|--------|--------|------------|---------------|
| id     | string | yes        | Credential ID |
